package messagepasser;

/**
 * 
 * @author Rishit Shroff(rshroff)
 * @author Huimin Yang(huiminy)
 * @description : Contains the definition of the ClockService class
 * An object factory is implemented to get different objects of Vector
 * and Logical Class
 */

public class ClockFactory {
	public ClockService getInstance(String instanceType) {
		if (instanceType.equals("Logical")) {
			return new Logical();
		}
		else if (instanceType.equals("Vector")) {
			return new Vector();
		}
		else {
			System.out.println("Invalid Clock Type, System exiting");
			return null;
		}
	}
}
